package com.ea.eadp.nexus.test.pageDefinition.originX;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

import com.ea.eadp.nexus.test.common.PageOperation;
import com.ea.eadp.nexus.test.pageDefinition.BasePage;

public class TwoFactorPage extends BasePage {

    public TwoFactorPage(final WebDriver driver) {
        super(driver, UpdateEmailPage.class);
    }

    public void waitPageLoadCompleted() {
        PageOperation.WebDriverWait(driver, "twoFactorCode");
    }

    public void inputTwofactorCode(final String email) {
        PageOperation.SendKeyToElementAfterWait(driver, "twoFactorCode", email);
    }

    public void clickSignInButton() {
        PageOperation.WebDriverWait(driver, "submit");
        driver.findElement(By.id("submit")).click();
    }
}

